{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "Viewing the Iris Dataset with Pandas"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import numpy as np    #Load the numpy library for fast array computations\n",
    "import pandas as pd   #Load the pandas data-analysis library\n",
    "import matplotlib.pyplot as plt   #Load the pyplot visualization library\n",
    "\n",
    "%matplotlib inline\n",
    "\n",
    "from sklearn import datasets\n",
    "iris = datasets.load_iris()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "iris_df = pd.DataFrame(iris.data, columns = iris.feature_names)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0xc44fc18>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXUAAAEACAYAAABMEua6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGTdJREFUeJzt3X+MHGd9BvDncc6E/KhzDhV3AoOXILm0Fek1FJKWFKYk\nlAAiqSLU2qGkm0pQIWiqUEW4tFKKhFBAQq5KW0FC6sNt3FBCAkGUNqDkRUopBOJsEsD8SNOzTRJf\nG2KDUhqb4G//2Jm7y2b35t2Z2Xvnfe/5SCvfzL47+8w7O9/b+97emGYGERFJw4bQAUREpDkq6iIi\nCVFRFxFJiIq6iEhCVNRFRBKioi4ikpDSok7yBpKLJO8fWP/HJPeTfIDktZOLKCIivqY8xuwG8BEA\ne4oVJDMAbwLwUjN7iuTPTyaeiIiMo/SdupndBeDIwOp3ALjWzJ7Kxzw2gWwiIjKmqj31bQBeRfKr\nJO8k+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nM+T/KU1yjXIAHyR5NdJvm3I\n/W2Zz7KcQPj5fBGAx0juzn/Evo7kKQNj2jCfPjmB8PO50u8B+Kch69swnyuNygkEnE8zewTAhwEc\nRH+OjprZlwaGjT2XtYs6yTcCWDSzHvrf9UJ/5xvKM+c9AF5oZnPoX9fmM2sYcaVXmtk56P9U8U6S\n5wfKUaYsZxvmcwrAOQD+Ns/6EwA7A+Qo45OzDfMJACC5EcDFAD4VKoOPkpxB55PkNPrvxLei34o5\nneRldbfbxDv1VwK4mORD6H83/C2SewbGPAzgBSuWt+Tr1lJpTjN7wsx+kn/9BQAbSZ65xjlhZo/m\n//4PgFvRv87OSm2Yz9KcLZnPHwA4ZGbfyJdvRr94rtSG+SzN2ZL5LLwewD35sR/UhvksjMzZgvm8\nEMBDZva4mf0MwC0AfmNgzNhzWbuom9l7zeyFZnYWgO0A7jCzyweG3QbgcmDpL1GPmtli3eduOufK\nXhXJV6D/kc/H1zInyVNJnp5/fRqA3wbwzYFhwefTJ2cb5jOfl0Mkt+WrLgDw7YFhwefTJ2cb5nOF\nHRjd0gg+nyuMzNmC+TwI4DySzyZJ9I/54N/6jD2XE7v2C8k/Qv+yAdeZ2b+QfAPJBwH8L4ArJvW8\n41qZE8CbSb4DwE8B/B/6vbi1NgPgVvYvrzAF4EYzu72F81maE+2YTwC4EsCN+Y/iDwG4ooXzWZoT\nLZlPkqei/y7z7SvWtW4+y3Ii8Hya2d0kbwZwb55hH4Dr6s6l/vhIRCQh+u/sREQSoqIuIpIQFXUR\nkYSoqIuIJERFXUQkISrqIiIJUVEXEUmIirqISEL+H9MXEUsEg5BJAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x88fc940>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "iris_df['sepal length (cm)'].hist(bins=30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/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erbqci/Js1sPnQ/gjsSyqdczS04X\n6tnyFgwfRUy9ll2G5nSklvcAeBHJp5Akmu/z5O/KjF3Pif+2Ccm/RPPX5a80s6+QvJDkzwE8DOCS\nSc9flO6cAP6M5F8DeBzA/6E5L6vaAoAvsPlnBWYBXGdmNztYz9SccKOeAHApgOtaX0bfDeASB+uZ\nmhMO1JPkLjSfMf5F12PO1TItJxyopZndSvJGAEdaOQ4DuHLSeuqXdEREPKT/Bk1ExENq3iIiHlLz\nFhHxkJq3iIiH1LxFRDyk5i0i4iE1bxERD6l5i4h46P8BV1KGNKr8w+AAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0xcd81c18>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "for class_number in np.unique(iris.target):\n",
    "    plt.figure(1)\n",
    "    iris_df['sepal length (cm)'].iloc[np.where(iris.target == class_number)[0]].hist(bins=30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n",
       "       113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125,\n",
       "       126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138,\n",
       "       139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149], dtype=int64)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.where(iris.target == class_number)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "finds the numpy index locations for each class of flower.\n",
    "\n",
    "\n",
    "Observe the histograms overlap. They encourage us to model the three histograms as three normal distributions. This is possible in a machine learning manner if we model the training data only as three normal distributions not the whole set. Then we use the test set to test the three-normal-distribution model we just made up. Finally, we test the accuracy of our predictions on the test set.\n",
    "\n",
    "How it works...\n",
    "\n",
    "The dataframe data object is a 2-D numpy array with column names and row names. In data science the fundamental data-object looks like a 2-D table, possibly because of SQL's long history. Numpy allows for 3-D arrays, cubes, 4-D arrays, etc. These come up often as well."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
